package routers

import (
	beego "github.com/beego/beego/v2/server/web"
	"xinhua_bookstore_db/controllers"
)

func init() {
	beego.Router("/", &controllers.MainController{})
	//用户注册
	beego.Router("/user/register", &controllers.UserController{}, "post:Register")
	//用户登录
	beego.Router("/user/login", &controllers.UserController{}, "post:Login")
	//图书添加
	beego.Router("/books/add", &controllers.BooksController{}, "post:Add")
	//收藏展示
	beego.Router("/collect/list", &controllers.CollectController{}, "get:List")
	//收藏展示
	beego.Router("/collect/list1", &controllers.CollectController{}, "get:List1")
	//收藏删除
	beego.Router("/collect/del", &controllers.CollectController{}, "post:Del")
}
